package com.bitland.demo.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bitland.demo.api.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author JOE
 * @since 2020-08-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("china_star")
public class Star extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 姓名
     */
    @NotNull(message = "{star.starname.not-null}")
    private String starName;

    /**
     * 曝光时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape= JsonFormat.Shape.STRING)
    private LocalDateTime publishTime;

    /**
     * 0,男，1，女，2，人妖
     */
    @PositiveOrZero(message = "性别格式不对")
    private Integer gender;

    /**
     * 0,男，1，女，2，双性恋
     */
    private Integer type;

    /**
     * 1已删除，0未删除
     */

    private Integer deleted;


    /**
     * 起始时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape= JsonFormat.Shape.STRING)
    private LocalDateTime publishBeginTime;

    /**
     * 结束时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",shape= JsonFormat.Shape.STRING)
    private LocalDateTime publishEndTime;

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
